{extend name="admin@public/base" /}
{block name="main-content"}
<div class="page-content">
	<div class="row maintop">
		<div style="margin:10px 0;" id="rule-add">
			<form class="form-horizontal ajaxForm2" name="weeklog_sys_add" method="post" action="{:url('admin/Weeklog/weeklog_sys_runadd')}">
				<div class="col-xs-12 col-sm-12">
					<small>状态：</small>
					<small>
						<select name="status">
							<option value="1">显示</option>
							<option value="0">不显示</option>
						</select>
					</small>
					<small class="sl-left10">领导名称：</small>
					<small>
						<select name="admin_id" required>
							<option value="0">--默认--</option>
							{foreach name="admin_list" item="v"}
							<option value="{$v.admin_id}" style="margin-left:55px;">{$v.admin_realname}</option>
							{/foreach}
						</select>
					</small>
					<small class="sl-left10">排序：</small>
					<small><input name="sort" id="sort" class="wh30" value="50"/></small>
					<small>
						<button class="btn btn-xs btn-danger ruleadd">
							添加
						</button>
					</small>
				</div>
			</form>
		</div>
		<div class="row">
			<div class="col-xs-12">
				<div>
					<form class="ajaxForm" name="ruleorder" method="post" action="{:url('admin/Weeklog/weeklog_sys_order')}" >
						<table class="table table-striped table-bordered table-hover" id="dynamic-table">
							<thead>
							<tr>
								<th>ID</th>
								<th></th>
								<th class="hidden-xs">名字</th>
								<th>显示</th>
								<th class="hidden-sm hidden-xs">级别</th>
								<th class="hidden-sm hidden-xs">添加时间</th>
								<th class="hidden-sm hidden-xs">排序</th>
								<th>操作</th>
							</tr>
							</thead>
							<tbody>
							{foreach name="ld_list" item="v"}
							<tr id="{$pid}-{$v.id}">
								<td height="28">{$v.id}</td>
								<td><a data-id="{$v.id}" data-level="{$v.level}" href="{:url('admin/Weeklog/weeklog_sys_list')}" style="cursor:pointer;" class="weeklog-sys-list"><span class="fa fa-plus blue"></span></a></td>
								<td class="hidden-xs" style='padding-left:{if condition="$v.leftpin neq 0"}{$v.leftpin}px{/if}' >{$v.lefthtml}{$v.admin_realname}</td>
								<td>
									{if condition="$v['status'] eq 1"}
									<a class="red display-btn" href="{:url('admin/Weeklog/weeklog_sys_state')}" data-id="{$v.id}" title="已显示">
										<div id="zt{$v.id}"><button class="btn btn-minier btn-yellow">显示</button></div>
									</a>
									{else/}
									<a class="red display-btn" href="{:url('admin/Weeklog/weeklog_sys_state')}" data-id="{$v.id}" title="已隐藏">
										<div id="zt{$v.id}"><button class="btn btn-minier btn-danger">隐藏</button></div>
									</a>
									{/if}
								</td>
								<td class="hidden-sm hidden-xs">{$v.level}级</td>
								<td class="hidden-sm hidden-xs">{$v.addtime|date="Y-m-d",###}</td>
								<td class="hidden-sm hidden-xs"><input name="{$v.id}" value="{$v.listorder}" class="list_order center"/></td>
								<td>
									<div class="hidden-sm hidden-xs action-buttons">
										<a class="blue" href="{:url('admin/Weeklog/weeklog_sys_add',array('pid'=>$v['id']))}"  title="添加下属">
											<i class="ace-icon fa fa-plus-circle bigger-130"></i>
										</a>
										<a class="green" href="{:url('admin/Weeklog/weeklog_sys_edit',array('id'=>$v['id']))}" title="修改">
											<i class="ace-icon fa fa-pencil bigger-130"></i>
										</a>
										<a class="red confirm-rst-url-btn" href="{:url('admin/Weeklog/weeklog_sys_del',array('id'=>$v['id']))}" data-info="你确定要移除吗？" title="删除">
											<i class="ace-icon fa fa-trash-o bigger-130"></i>							</a>
									</div>
									<div class="hidden-md hidden-lg">
										<div class="inline position-relative">
											<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
												<i class="ace-icon fa fa-cog icon-only bigger-110"></i>
											</button>
											<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
												<li>
													<a href="{:url('admin/Weeklog/weeklog_sys_add',array('pid'=>$v['id']))}"  class="tooltip-success" data-rel="tooltip" title="" data-original-title="添加下属">
																		<span class="green">
																			<i class="ace-icon fa fa-plus-circle bigger-120"></i>
																		</span>
													</a>
												</li>
												<li>
													<a href="{:url('admin/Weeklog/weeklog_sys_edit',array('id'=>$v['id']))}" class="tooltip-success" data-rel="tooltip" title="" data-original-title="修改">
																			<span class="green">
																				<i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
																			</span>
													</a>
												</li>
												<li>
													<a href="{:url('admin/Weeklog/weeklog_sys_del',array('id'=>$v['id']))}"  data-info="你确定要移除吗？" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="" data-original-title="删除">
																			<span class="red">
																				<i class="ace-icon fa fa-trash-o bigger-120"></i>
																			</span>
													</a>
												</li>
											</ul>
										</div>
									</div>
								</td>
							</tr>
							{/foreach}
							<tr>
								<td colspan="9" align="left"><button type="submit"  id="btnorder" class="btn btn-white btn-yellow btn-sm">排序</button></td>
							</tr>
							</tbody>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
</div><!-- /.page-content -->
{/block}